<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center instructioning_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }" v-if="bbb">
				<view class='flex flex-wrap align-center justify-between flex-sub instructioning_fd0_0'>
					<view class='flex flex-wrap align-center instructioning_fd0_0_c0'>
						<text class='fu-iconfont2  instructioning_fd0_0_c0_c0' @tap.stop="handleJumpDiy"
							data-type="back" data-url="1">&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='instructioning_fd0_0_c1_c0'>课程详情</text>
					</view>
					<view class='flex flex-wrap align-center justify-end instructioning_fd0_0_c0'>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}" v-if="bbb"></view>
			<view class="flex benben-position-layout flex flex-wrap align-center instructioning_flex_00123456"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }" v-if="!bbb">
				<view class='flex flex-wrap align-center justify-between flex-sub instructioning_fd0_0'>
					<view class='flex flex-wrap align-center instructioning_fd0_0_c0'>
						<text class='fu-iconfont2  instructioning_fd0_0_c0_c00023' @tap.stop="handleJumpDiy"
							data-type="back" data-url="1">&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='instructioning_fd0_0_c1_c0'></text>
					</view>
					<view class='flex flex-wrap align-center justify-end instructioning_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}" v-if="!bbb"></view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center instructioning_flex_1">
				<image class='instructioning_fd1_0' mode="aspectFill" :src='list.cover'></image>
			</view>

			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout instructioning_flex_2">
				<view class='flex flex-direction flex-wrap align-stretch instructioning_fd2_0'>
					<text class='instructioning_fd2_0_c0'>{{list.class_hour_name}} <text
							class="instructioning_fd2_0_c0_0">授课中</text></text>
					<view class='flex flex-wrap align-center'>
						<text class='instructioning_fd2_0_c1_c0'>{{$t('上课时间：')}}</text>
						<text class='instructioning_fd2_0_c1_c0'>{{time}}</text>
					</view>
				</view>
				<u-sticky :offsetTop="StatusBarRpx">
					<view class='flex flex-direction flex-wrap align-stretch instructioning_fd2_1'>
						<benben-flex-tabs class-name='instructioning_benbenTabsfd2_1_c0' v-model="tabsVal"
							ref="benben_tabsfd2_1_c0" select-mark="benben_tabsfd2_1_c0" key="benben_tabsfd2_1_c0"
							:open-title-type='false' :open-sticky='false' :top='0' :is-show-content='false'
							:scrollspy='false' :tabs-info.sync="tabsInfofd2_1_c0" @change="ChangeTabsFunc()">

							<scroll-view @scroll="tabsInfofd2_1_c0.scrollX = $event.detail.scrollLeft"
								id="benben_tabsfd2_1_c0" class="benben-tabs" style="width:700rpx" :scroll-x="true"
								:scroll-left="tabsInfofd2_1_c0.moveX" scroll-with-animation="all .3s ease">
								<view class="benben-tabs-content" id="benben_tabsfd2_1_c0-content">
									<view id="benben_tabsfd2_1_c0-title"
										class="benben-tabs-title flex flex align-center justify-around">
										<template v-for='(item,key0) in tabs'>
											<view :key='key0'
												:class="{ 'checkTitlefd2_1_c0': tabsVal == item.value, 'flex flex-wrap align-center instructioning_titlefd2_1_c0_c3': true }"
												@tap="tabsVal = item.value"
												:id="`benben_tabsfd2_1_c0-title-item-${item.value}`">
												<text>{{item.name}}</text>
											</view>
										</template>
									</view>
									<view
										:style="{ left: tabsInfofd2_1_c0.lineleft, maxWidth: tabsInfofd2_1_c0.lineWidth ,}"
										id="benben_tabsfd2_1_c0-line"
										class="benben-tabs-line flex benben-flex-tabs-line instructioning_linefd2_1_c0"
										:class="{'benben-tabs-line-active':tabsInfofd2_1_c0.isInit}"></view>
								</view>
							</scroll-view>
						</benben-flex-tabs>
					</view>
				</u-sticky>

				<view class='flex flex-direction flex-wrap align-stretch instructioning_fd2_1' v-if=" tabsVal=='1'">
					<view class='flex flex-wrap align-center instructioning_fd2_2_c0' v-if=" tabsVal=='1'">
						<jyf-parser class='instructioning_fd2_2_c0_c0' :html="list.teaching_content | richTextFormat">
						</jyf-parser>
					</view>
				</view>
				<view class='flex flex-direction flex-wrap align-stretch' v-if=" tabsVal=='2'">
					<view class='flex flex-wrap align-center instructioning_fd2_3_c0'>
						<jyf-parser class='instructioning_fd2_2_c0_c0' :html="list.educational_goals | richTextFormat">
						</jyf-parser>
					</view>
				</view>
				<view class='flex flex-direction flex-wrap align-stretch' v-if=" tabsVal=='3'">
					<view class='flex flex-wrap align-center instructioning_fd2_3_c0'>
						<view class='flex flex-wrap align-start justify-between'>
							<text class='instructioning_fd2_4_c0_c0_c0'>{{$t('学习重点')}}</text>
							<image class='instructioning_fd2_4_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"1608.png"'
								@tap.stop="get662c96aab794d()"></image>
						</view>
						<jyf-parser class='instructioning_fd2_2_c0_c0' :html="list.teaching_focus | richTextFormat">
						</jyf-parser>
					</view>
					<view class='flex flex-wrap align-center instructioning_fd2_3_c0'>
						<view class='flex flex-wrap align-start justify-between'>
							<text class='instructioning_fd2_4_c0_c0_c0'>{{$t('学习难点')}}</text>
							<image class='instructioning_fd2_4_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"1608.png"'
								@tap.stop="get662c96aab794deeee()">
							</image>
						</view>
						<jyf-parser class='instructioning_fd2_2_c0_c0'
							:html="list.teaching_difficulties | richTextFormat">
						</jyf-parser>
					</view>
				</view>

				<!-- 学习资料 -->
				<view class='flex flex-direction flex-wrap align-stretch' v-if=" tabsVal=='4'">
					<template v-for='(item,key0) in datum'>
						<!--mp4  -->
						<view class='flex flex-wrap align-center justify-between instructioning_fd2_5_c0'
							v-if="item.file_type==2" :key='key0'>
							<view class='flex flex-wrap align-center'>
								<image class='instructioning_fd2_5_c0_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"1610.png"'></image>
								<text class='instructioning_fd2_5_c0_c0_c1'>{{$t('资料名称.mp4')}}</text>
							</view>
							<button class='instructioning_fd2_5_c0_c1'
								@tap="seePdf(item.file_path[0],item.aid)">{{$t('查看')}}</button>
						</view>

						<!-- pdf -->
						<view class='flex flex-wrap align-center justify-between instructioning_fd2_5_c0'
							v-if="item.file_type==5" :key='key0'>
							<view class='flex flex-wrap align-center'>
								<image class='instructioning_fd2_5_c0_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"1611.png"'></image>
								<text class='instructioning_fd2_5_c0_c0_c1'>{{$t('资料名称.pdf')}}</text>
							</view>
							<button class='instructioning_fd2_5_c0_c1'
								@tap="seePdf(item.file_path[0],item.aid)">{{$t('查看')}}</button>
						</view>

						<!-- ppt -->
						<view class='flex flex-wrap align-center justify-between instructioning_fd2_5_c0'
							v-if="item.file_type==4" :key='key0'>
							<view class='flex flex-wrap align-center'>
								<image class='instructioning_fd2_5_c0_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"1612.png"'></image>
								<text class='instructioning_fd2_5_c2_c0_c1'>{{$t('资料名称.ppt')}}</text>
							</view>
							<button class='instructioning_fd2_5_c0_c1'
								@tap="seePdf(item.file_path[0],item.aid)">{{$t('查看')}}</button>
						</view>

						<!-- 文档 -->
						<view class='flex flex-wrap align-center justify-between instructioning_fd2_5_c0'
							v-if="item.file_type==7" :key='key0'>
							<view class='flex flex-wrap align-center'>
								<image class='instructioning_fd2_5_c0_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"1613.png"'></image>
								<text class='instructioning_fd2_5_c2_c0_c1'>{{$t('资料名称.doc')}}</text>
							</view>
							<button class='instructioning_fd2_5_c0_c1'
								@tap="seePdf(item.file_path[0],item.aid)">{{$t('查看')}}</button>
						</view>

						<!-- 图片 -->
						<view class='flex flex-wrap align-center justify-between instructioning_fd2_5_c0'
							v-if="item.file_type==1" :key='key0'>
							<view class='flex flex-wrap align-center'>
								<image class='instructioning_fd2_5_c0_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"1614.png"'></image>
								<text class='instructioning_fd2_5_c0_c0_c1'>{{$t('资料名称.png')}}</text>
							</view>
							<button class='instructioning_fd2_5_c0_c1'
								@tap="seePdf(item.file_path[0],item.aid)">{{$t('查看')}}</button>
						</view>
					</template>
				</view>
			</view>

			<!-- AI -->
			<AIicon></AIicon>
			<!-- 签到 -->
			<view class="flex benben-position-layout flex flex-wrap align-center classhourPar_flex_5" v-if="signInShow">
				<image class='classhourPar_fd5_0' mode="aspectFill" :src='STATIC_URL+"1609.png"' @tap.stop="signHandle">
				</image>
			</view>
			<!-- 课堂活动 -->
			<view class="flex benben-position-layout flex flex-wrap align-center instructioning_flex_6">
				<image class='instructioning_fd6_0' mode="aspectFill" :src='STATIC_URL+"1634.png"'
					@tap.stop="popupShow1728459874280=true"></image>
			</view>

			<!---弹框布局-->
			<benben-popup v-model="popupShow1728459874280" :mask="false" :mask-close-able="false" mode='bottom'
				:z-index='99999'>
				<view class="flex flex-wrap align-end justify-end benben-flex-layout instructioning_flex_3">
					<image style="opacity: 0.5;" class='instructioning_fd3_0' mode="aspectFill"
						:src='STATIC_URL+"1640.png"'></image>
					<image style="opacity: 0.5;" class='instructioning_fd3_1' mode="aspectFill"
						:src='STATIC_URL+"1639.png"'></image>
					<image class='instructioning_fd3_2' mode="aspectFill" src='/static/images/1638.png'
						@tap.stop="windowHide()"></image>
					<image class='instructioning_fd3_3' mode="aspectFill" :src='STATIC_URL+"1636.png"'
						@tap.stop="popupShow1728459874280=false"></image>
				</view>
			</benben-popup>

			<benben-popup v-model="popupShow1728358921654" :mask="true" :mask-close-able="true" mode='center'
				:z-index='1000' background-color='rgba(51, 51, 51, 0.4)'>
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout instructioning_flex_4">
					<view class='flex flex-direction flex-wrap align-center instructioning_fd4_0'>
						<text class='instructioning_fd4_0_c0'>{{$t('AI智能分析')}}</text>

						<scroll-view class='instructioning_fd4_0_c1' :scroll-y='true' :show-scrollbar='true'>
							<view class='flex benben-scroll flex align-center'>
								<jyf-parser class='instructioning_fd2_2_c0_c0' :html="analyse">
								</jyf-parser>
							</view>
						</scroll-view>

					</view>
					<view class='flex flex-wrap align-center justify-center instructioning_fd4_1'>
						<image class='instructioning_fd4_1_c0' mode="aspectFit" :src='STATIC_URL+"1604.png"'
							@tap.stop="popupShow1728358921654=false"></image>
					</view>
				</view>
			</benben-popup>

			<!-- 立即签到弹框-->
			<benben-popup v-model="popupShow1728358921655" :mask="true" :mask-close-able="true" mode='center'
				:z-index='1000' style="overflow: auto" background-color='rgba(51, 51, 51, 0.4)'>
				<view style="position: relative;"
					class="flex flex-direction flex-wrap align-stretch benben-flex-layout ">
					<view class='sign-now flex flex-direction flex-wrap align-center '>
						<image class="sign-now-top" style="width:350rpx ; height: 92rpx;" src="@/static/sign/01.png"
							mode=""></image>
						<view class="sign-btn" @click.stop="startSign">
							立即签到
						</view>

						<view @click.stop="popupShow1728358921655=false" class="later-btn">
							稍后提醒我
						</view>
					</view>
				</view>
			</benben-popup>

			<!-- 选人弹框-->
			<benben-popup v-model="popupShow1728358921656" :mask="true" :mask-close-able="true" mode='center'
				:z-index='1000' style="overflow: auto" background-color='rgba(51, 51, 51, 0.4)'>
				<view style="position: relative;"
					class="flex flex-direction flex-wrap align-stretch benben-flex-layout ">
					<view class='flex flex-direction flex-wrap align-center '>
						<image style="width: 629rpx; height: 687rpx;" src="@/static/sign/change.png" mode=""></image>
					</view>
					<view style="margin-top: 12rpx;" class='flex flex-wrap align-center justify-center'>
						<image class='instructioning_fd4_1_c1' mode="aspectFit" src="@/static/sign/close.png"
							@tap.stop="popupShow1728358921656=false"></image>
					</view>
				</view>
			</benben-popup>

			<!-- 投票弹框-->
			<benben-popup v-model="popupShow1728358921657" :mask="true" :mask-close-able="true" mode='center'
				:z-index='1000' style="overflow: auto" background-color='rgba(51, 51, 51, 0.4)'>
				<view style="position: relative;"
					class="flex flex-direction flex-wrap align-stretch benben-flex-layout ">
					<view class='vote-outer flex flex-direction flex-wrap align-center'>
						<image style="width: 297rpx; height: 194rpx; margin-top: 58rpx;" src="@/static/sign/top.png"
							mode=""></image>
						<text class="text-outer">您有一份投票活动待参加</text>
						<view class="vote-btn" @click.stop="voteHandle">
							立即投票
						</view>
					</view>
					<view style="margin-top: 48rpx;" class='flex flex-wrap align-center justify-center'>
						<image class='instructioning_fd4_1_c1' mode="aspectFit" src="@/static/sign/close.png"
							@tap.stop="popupShow1728358921657=false"></image>
					</view>
				</view>
			</benben-popup>
			<!-- 随堂测弹框-->
			<benben-popup v-model="stopen" :mask="true" :mask-close-able="true" mode='center'
				:z-index='1000' style="overflow: auto" background-color='rgba(51, 51, 51, 0.4)'>
				<view style="position: relative;"
					class="flex flex-direction flex-wrap align-stretch benben-flex-layout ">
					<view class='vote-outer flex flex-direction flex-wrap align-center'>
						<image style="width: 297rpx; height: 194rpx; margin-top: 58rpx;" src="@/static/sign/top.png"
							mode=""></image>
						<text class="text-outer">您有一份随堂测试待完成</text>
						<view class="vote-btn" @click.stop="gocs">
							开始答题
						</view>
					</view>
					<view style="margin-top: 48rpx;" class='flex flex-wrap align-center justify-center'>
						<image class='instructioning_fd4_1_c1' mode="aspectFit" src="@/static/sign/close.png"
							@tap.stop="stopen=false"></image>
					</view>
				</view>
			</benben-popup>
			<!-- 抢答弹框-->
			<benben-popup v-model="qdopen" :mask="true" :mask-close-able="true" mode='center'
				:z-index='1000' style="overflow: auto" background-color='rgba(51, 51, 51, 0.4)'>
				<view style="position: relative;" @click.stop="goqd"
					class="flex flex-direction flex-wrap align-stretch benben-flex-layout ">
					<view class='qd flex flex-direction flex-wrap align-center'>
						<image style="width: 310rpx; height: 310rpx; margin-top: 104rpx;" class="qdimg" :src='last_time?STATIC_URL+"stcimg/8.png":STATIC_URL+"stcimg/10.png"'
							mode=""></image>
							<text class="djs" v-if='last_time'>{{timeDisplay}}</text>
						<text class="text-outer" v-if="last_num">还剩{{last_num}}个名额快去抢~</text>
					</view>
				</view>
			</benben-popup>
		</view>
	</page-body>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	import AIicon from "@/pages/My/AIChat/AIicon.vue"
	import {
		mdToHtml
	} from '@/common/utils/mdParser.js'

	export default {
		components: {
			AIicon
		},

		data() {
			return {
				"popupShow1728358921654": false,
				"popupShow1728459874280": false,
				"popupShow1728358921655": false,
				"popupShow1728358921656": false,
				"popupShow1728358921657": false,
				stopen:false,
				qdopen:false,
				timer:'',
				exampaper_id:'',//随堂测试卷id
				"votequestion_id": '',
				"bbb": false,
				"tabsInfofd2_1_c0": {
					lineleft: '',
					lineWidth: '',
					moveX: 0,
					scrollX: 0,
					PageScrollX: 0,
					isInit: false
				},
				"tabs": [{
						"name": "学习内容",
						"value": "1",
						"image": ""
					},
					{
						"name": "学习目标",
						"value": "2",
						"image": ""
					}, {
						"name": "学习重难点",
						"value": "3",
						"image": ""
					}, {
						"name": "学习资料",
						"value": "4",
						"image": ""
					},
				],
				"tabsVal": "1",
				"list": {
					"class_hour_name": "",
					"content": "",
					"courseplan_name": "",
					"courseplan_teacher": "",
					"lessonplanningmode_name": "",
					"educational_goals": "",
					"teaching_content": "",
					"teaching_focus": "",
					"teaching_difficulties": "",
					"lesson_planning_status": "",
					"aid": "",
					"lessonplanningmode_id": "",
					"courseplan_id": "",
					"cover": ""
				},
				"datum": [],
				"time": "",
				"sys_msg_id": "",
				"teaching_id": "",
				"analyse": "",
				"lessonplanning_id": "",
				"signInShow": false, //签到按钮
				"state": {}, //获取签到信息
				remainingSeconds:0,
				last_num:'',//抢答剩余名额
				last_time:'',//抢答剩余时间  秒
				quick_id:'',//抢答id
				quick_time:'',//抢答发起的时间
			};
		},
		computed: {
			timeDisplay() {
				const h = String(Math.floor(this.remainingSeconds / 3600)).padStart(2, '0');
				const m = String(Math.floor((this.remainingSeconds % 3600) / 60)).padStart(2, '0');
				const s = String(this.remainingSeconds % 60).padStart(2, '0');
				return `${h}:${m}:${s}`;
			}
		},
		watch: {},
		onLoad(options) {
			let {
				lessonplanning_id,
				teaching_id,
				time,
				sys_msg_id
			} = options

			if (lessonplanning_id !== undefined) this.lessonplanning_id = lessonplanning_id
			if (teaching_id !== undefined) this.teaching_id = teaching_id
			if (time !== undefined) this.time = time
			if (sys_msg_id !== undefined) this.sys_msg_id = sys_msg_id


			this.getlp690e155cdbd2Func()
		},
		onUnload() {},
		onReady() {},
		onShow() {
			this.getia5fa3d29a7663Func()
		},
		onHide() {},
		onResize() {},
		onPullDownRefresh() {},
		onReachBottom(e) {},
		onPageScroll(e) {
			console.log(e);
			if (e.scrollTop >= 200) {
				this.bbb = true
			} else {
				this.bbb = false
			}
		},
		methods: {
			//课程备课-获取备课详情
			async getlp690e155cdbd2Func() {
				//请求方法
				//数据验证
			
				let datalist = await this.$api.get(global.apiUrls.post6690e155cdbd2, {
					aid: this.lessonplanning_id,
					teaching_id: this.teaching_id
				});
			
				if (datalist.data.code != 1) {
					this.$message.info(datalist.data.msg);
					return
				}
				let infolist = datalist.data;
				this.list = infolist.data
			
				//未投票
				if (datalist.data.data.vote_status == 1) {
					this.popupShow1728358921657 = true
					this.votequestion_id = datalist.data.data.votequestion_id
				}
				//随堂测试
				if (datalist.data.data.exam_status == 1) {
					this.stopen = true
					this.exampaper_id = datalist.data.data.exampaper_id
					console.log(this.exampaper_id)
					
				}
				// 抢答
				// this.qdopen = true
				// this.last_time=900
				// this.remainingSeconds=900
				// this.last_num=3
				// this.startCountdown()
				if (datalist.data.data.quick_status == 1) {
					this.popupShow1728358921657 = false
					this.stopen = false
					this.qdopen = true
					this.exampaper_id = datalist.data.data.exampaper_id
					this.last_num=datalist.data.data.last_num
					this.last_time=datalist.data.data.last_time
					this.quick_id=datalist.data.data.quick_id
					this.quick_time=datalist.data.data.quick_time
					this.remainingSeconds =datalist.data.data.last_time 
					
					console.log(this.exampaper_id)
					if(this.last_time){
						this.startCountdown()
					}
				}
				
				
			},
			
			//上课签到-获取上课签到状态
			async getia5fa3d29a7663Func() {
				return
				let datastate = await this.$api.get(global.apiUrls.post6708db8f9bf3a, {
					teaching_id: this.teaching_id,
					sys_msg_id: this.sys_msg_id
				});

				if (datastate.data.code != 1) {
					this.$message.info(datastate.data.msg);
					return
				}

				this.state = datastate.data.data
				this.signInShow = this.state.status
			},
			startCountdown() {
				// this.remainingSeconds = this.examTime * 60;
			
				if (this.timer) clearInterval(this.timer);
			
				this.timer = setInterval(() => {
					if (this.remainingSeconds > 0) {
						this.remainingSeconds--;
					} else {
						clearInterval(this.timer);
						if(this.qdopen){
							this.qdopen=false
							uni.navigateTo({
								url:'/pages/suitc/qdjg/qdjg?type=2'
							})
						}
						
						// this.qdopen=true
						//考试时间到，强制交卷
						// this.tjda(2)
					}
					console.log(this.remainingSeconds)
				}, 1000);
			},
			//点击签到按钮
			signHandle() {
				this.popupShow1728358921655 = true
			},
			//投票
			voteHandle() {
				this.$urouter.navigateTo(
					`/pages/course/vote/vote?votequestion_id=${this.votequestion_id}`
				)
			},
			// 跳转随堂测
			gocs(){
				this.$urouter.navigateTo(
					`/pages/suitc/ceshi/ceshi?id=${this.exampaper_id}`
				)
			},
			// 抢答
			async goqd(){
				let newtime= new Date().getTime() / 1000
				let time= newtime - this.quick_time
				time=time.toFixed(2)
				console.log(time)
				let obj={
					quick_id: this.quick_id,
					use_time:time
				}
				console.log(obj)
				// this.qdopen=false
				// this.$urouter.navigateTo(
				// 	`/pages/suitc/qdjg/qdjg?id=${this.id}&type=1`
				// )
				// return
				let datalist = await this.$api.post(global.apiUrls.post68bff7662ab8d, {
					quick_id: this.quick_id,
					use_time:time
				});
				this.getlp690e155cdbd2Func()			
				if (datalist.data.code != 1) {
					this.$message.info(datalist.data.msg);
					return
				}
				let infolist = datalist.data;
				clearInterval(this.timer);
				this.qdopen=false
				console.log(infolist)
				uni.navigateTo({
					url:`/pages/suitc/qdjg/qdjg?id=${this.quick_id}&type=1`
				})
			},
			startSign() {
				//普通签到
				if (this.state.check_type == '1') {
					this.getds6f3d2a40dd89Func()
				}
				// 手势签到
				else if (this.state.check_type == '2') {
					this.$urouter.navigateTo(
						`/pages/course/gestureSign/gestureSign?teaching_id=${this.teaching_id}`
					)
				}
				// 二维码签到
				else if (this.state.check_type == '3') {
					this.$urouter.navigateTo(
						`/pages/course/QRsign/QRsign?teaching_id=${this.teaching_id}`
					)
				}
				// 签到码签到
				else if (this.state.check_type == '4') {
					this.$urouter.navigateTo(
						`/pages/course/shuziSign/shuziSign?teaching_id=${this.teaching_id}&check_password=${this.state.check_password}`
					)
				}
				this.popupShow1728358921655 = false
			},

			async getds6f3d2a40dd89Func() {
				let data66f3d2a40dd89 = await this.$api.post(global.apiUrls.post66f3d2a40dd89, {
					teaching_id: this.teaching_id
				});

				if (data66f3d2a40dd89.data.code != 1) {
					this.$message.info(data66f3d2a40dd89.data.msg);
					return
				} else {
					this.$message.info('操作成功');
				}

				this.getia5fa3d29a7663Func()
			},


			async get662c96aab794d() {
				uni.showLoading({
					title: 'AI分析中...',
				});

				let data662c96aab794d = await this.$api.post(global.apiUrls.post662c96aab794d, {
					content: `针对一名学生，在进行课前预习时，请针对课程【${this.list.courseplan_name}】内【${this.list.class_hour_name}】下的学习重点【${this.list.teaching_focus}】进行分析，指导学生进行预习`
				})
				if (data662c96aab794d.data.code != 1) {
					this.$message.info(data662c96aab794d.data.msg);
					return
				}
				let info662c96aab794d = data662c96aab794d.data.data
				this.analyse = mdToHtml(info662c96aab794d.choices[0].message.content)
				uni.hideLoading()
				this.popupShow1728358921654 = true
			},
			async get662c96aab794deeee() {
				uni.showLoading({
					title: 'AI分析中...',
				});

				let data662c96aab794d = await this.$api.post(global.apiUrls.post662c96aab794d, {
					content: `针对一名学生，在进行课前预习时，请针对课程【${this.list.courseplan_name}】内【${this.list.class_hour_name}】下的学习难点【${this.list.teaching_focus}】进行分析，指导学生进行预习`
				})
				if (data662c96aab794d.data.code != 1) {
					this.$message.info(data662c96aab794d.data.msg);
					return
				}
				let info662c96aab794d = data662c96aab794d.data.data
				this.analyse = mdToHtml(info662c96aab794d.choices[0].message.content)
				uni.hideLoading()
				this.popupShow1728358921654 = true
			},
			//跳转
			windowHide() {
				this.popupShow1728459874280 = false
				this.$urouter.navigateTo(`/pages/course/talk/talk?teachin=${this.teaching_id}`)
			},
			seePdf(file, aid, item) {
				console.log('vvvvvvvvvvvvvv', item);
				let _this = this;
				let id = aid;
				let url = file;
				// #ifdef APP-PLUS

				let files = uni.getStorageSync('files') ? JSON.parse(uni.getStorageSync('files')) : {}
				console.log(files)
				if (files[id]) {
					plus.runtime.openFile(files[id], {}, (res) => {
						console.log("res=>", res);
					})
				} else {
					downloadFile()
				}

				function downloadFile() {
					uni.showLoading({
						title: '加载中'
					})
					const dtask = plus.downloader.createDownload(url, {}, function(d, status) {
						if (status == 200) {
							console.log('保存成功')
							uni.hideLoading();
							files[id] = d.filename
							uni.setStorageSync('files', JSON.stringify(files))
							plus.runtime.openFile(d.filename)
						} else {
							plus.downloader.clear()
							uni.hideLoading();
							uni.showToast({
								title: '文档加载失败，请稍后再试',
								icon: 'none',
							})
						}
					})
					dtask.start()
				}
				// #endif

				// #ifdef H5
				window.open(url)
				// #endif
			},
			//备课管理-获取课件列表
			async getim68f99801dcf8Func() {
				//请求方法
				//数据验证

				let datadatum = await this.$api.get(global.apiUrls.post668f99801dcf8, {
					lessonplanning_id: this.lessonplanning_id
				});

				if (datadatum.data.code != 1) {
					this.$message.info(datadatum.data.msg);
					return
				}
				let infodatum = datadatum.data;
				this.datum = infodatum.data

			},
			//tabs改变时
			ChangeTabsFunc() {
				if (this.tabsVal == '4') {
					this.getim68f99801dcf8Func()
				}
			}
		}
	};
</script>
<style lang="scss" scoped>
	@import "./instructioning.css";
	.qdimg{
			  position: relative; 
			    -webkit-animation: twinkling 1.3s infinite ease-in-out;
			    animation: twinkling 1.3s infinite ease-in-out;
			    -webkit-animation-fill-mode: both;
			    animation-fill-mode: both;
		}
		// @-webkit-keyframes twinkling {
		//   0% {
		//     opacity: 1;
		//     filter: alpha(opacity=20);
		//     -webkit-transform: scale(1);
		//   }
		
		//   50% {
		//     opacity: 1;
		//     filter: alpha(opacity=50);
		//     -webkit-transform: scale(1.06);
		//   }
		
		//   100% {
		//     opacity: 1;
		//     filter: alpha(opacity=20);
		//     -webkit-transform: scale(1);
		//   }
		// }
		
		@keyframes twinkling {
		  0% {
			   transform: scale(1);
		    // opacity: 1;
		    // filter: alpha(opacity=10);
		    // -webkit-transform: scale(1);
		  }
		
		  50% {
			   transform: scale(1.3);
		    // opacity: 1;
		    // filter: alpha(opacity=50);
		    // -webkit-transform: scale(1.06);
		  }
		
		  100% {
			   transform: scale(1);
		    // opacity: 1;
		    // filter: alpha(opacity=100);
		    // -webkit-transform: scale(1);
		  }
		}
</style>